[Improve] Keep compact communication footers current with coding activity - #2415
Conversation
|
No new code issues found. See task
Reviewed 4357f7c |
|
Latest simplification: d689adba. Removed generic footer deletion of All 316 communication tests, communication TypeScript, and pre-push checks pass locally. Fresh GitHub Test, Type Check, Lint and Knip pass; Roomote review, JavaScript CodeQL analysis and build are still running. Previous mention-footer removal and Redis mock fixes remain intact. |
…-footer-2zog0frjgail2
- Compare Slack footer text after decoding the entities Slack escapes on read-back, so unchanged footers no longer trigger an edit every tick. - Report what each refresh learned: active destinations re-check every 30 seconds, idle ones every 5 minutes, and settled or unresolvable ones unregister instead of polling for the record's whole lifetime. - Lease claimed targets past the scheduler cadence, run one pass at a time under a job lock with a deadline, and reschedule explicitly. - Resolve state outside the destination lock and hold it only for the provider edit; refreshes try the lock once, deliveries wait longer, and the Slack details toggle tells the user when the thread is busy. - Check the KEEPTTL XX result so an edit on an expired record strips its own footer instead of leaving an orphan. - Strip the footer from the previous source-control comment when a new turn relocates it. - Keep the thread's own task selected when a task footer opens the owning Session, and keep caller-owned navigation such as setup links. - Carry pull request links a refresh cannot re-derive until the database says they are closed; text providers post the caller's footer as-is. - Resolve every linked task's latest run in one query. - Document the compact footer on the provider pages.
Write the source-control footer record and verify lock ownership in one Redis operation, for both initial delivery and the post-edit refresh write, so a lease that lapses after assertLock cannot repoint refresh at a historical comment. A refresh whose write loses strips the footer it just applied when a newer carrier exists.
A competitor that loses the lease race can rewrite the same comment rather than relocate the footer. Treat a different recorded body or footer on the same comment id as the newer carrier and put its content back, in both the delivery and refresh cleanup paths.
Recovery after a lost footer lease re-reads the record and edits the comment while holding the destination lock (the caller's lease when it still holds it, otherwise a fresh one), so a later owner cannot persist newer content between the read and the edit and be painted over.
A restoring provider edit can outlive its lease. Only a lease still held after the edit proves nothing newer landed meanwhile; otherwise the restoration starts over under a fresh lock, up to three times, comparing the record against what it last wrote.
When a restoring edit's lease is lost after the edit, stop guessing: mark the record's footer unknown under a fenced write and schedule a refresh, so the next pass rewrites the comment from the record with its own fenced post-edit write. The record, never a stale provider response, decides what the comment shows.
Rename the footer's navigation link from "Web app" to "Open in Roomote" on every communication and source-control surface, and render the footer as plain text (Discord keeps its small-text prefix, GitHub its <sub>). The refresh parser accepts both labels so footers posted before this change keep refreshing.
… parser The compact "Web app" footer never shipped; released footers were the sentence style and are not registered for refresh, so only "Open in Roomote" needs to parse. Align the remaining Slack and router test fixtures with the plain, renamed footer.
|
Completed in 4357f7ce. The footer now renders Passed: communication 331, Slack 478, SDK 1,811, API 2,604, package TypeScript checks, docs validation and broken links, plus the full pre-push lint/type/knip gate. Browser proof was not applicable to these external-provider surfaces. No live provider end-to-end test was performed. |
What changed
Reply anytimefirst; a plain1 task runningor<N> tasks runningchunk only while work is running; linked pull requests next, comma-separated within one chunk when there are several; and linkedOpen in Roomotelast.Why this change was made
Users need a consistent, compact way to reply, see active coding work, open created pull requests, and return to the Roomote transcript without stale status text or an extra Preview link.
Impact
Footer refresh remains eventually consistent: destinations with running tasks are checked about every 30 seconds, with bounded batches and retries that can add delay under load. Automated coverage exercises zero, one, and multiple running tasks and pull requests across communication and source-control providers, including live
2 -> 1 -> 0refresh transitions and preview-only settlement. Communication, Slack, SDK, API, package typechecks, docs validation, broken links, and the pre-push lint/type/knip gates pass. No browser screenshots or live external-provider end-to-end validation were performed.